<template>
    <div class="data-panel">
        <h3>{{itemData.name}}</h3>
        <div class="panel-data">¥ {{itemData.num}}</div>
        <div class="data-compare">
            <span class="txt">同比：</span>
            <span class="per">{{itemData.per}}</span>
            <img :src="itemData.status ? up : down" />
        </div>
    </div>
</template>

<script>
    let up = require('../imgs/up.png');
    let down = require('../imgs/down.png');
    export default {
        name: 'dataPanel',
        props: {
            itemData: {
                type: Object,
                default: () => ({}),
                required: true
            }
        },
        data() {
            return {
                up: up,
                down: down
            }
        },
    }
</script>